package com.anywhere.freightman.system.controller;

import com.anywhere.freightman.common.entity.ReturnResp;
import com.anywhere.freightman.order.service.ICompanyService;
import com.anywhere.freightman.system.controller.request.CompanyRegRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("reg")
public class RegController {

    @Autowired
    private ICompanyService companyService;

    @PostMapping
    public ReturnResp reg(@RequestBody CompanyRegRequest request) {
        companyService.infoReg(request);
        return ReturnResp.buildOk();
    }
}
